from handlers.requesthandler import RequestHandler
from google.appengine.ext import db

class Image (RequestHandler):
    def get(self):
        video = db.get(self.request.get("img_id"))
        if video.cover:
            self.response.headers['Content-Type'] = "image/png"
            self.response.out.write(video.cover)
        else:
            self.response.out.write("No image")